<?php
/**
 * Created by PhpStorm.
 * User: 刚
 * Date: 2017/7/31
 * Time: 13:58
 */
use kartik\builder\Form;
$form = \kartik\form\ActiveForm::begin();

echo Form::widget([
//    'model' => $model,
    'form' => $form,
    'columns' => 2,
    'attributes' => [
        'username' => ['type'=>Form::INPUT_TEXT,'options'=>['placeholder'=>'Enter username...']],
        'password' => ['type' => Form::INPUT_PASSWORD,'options'=>['placeholder'=>'Enter username...']],
        'rememberMe' => ['type' => Form::INPUT_CHECKBOX,],
    ]
]);
\kartik\form\ActiveForm::end();